CLR2GRAY
Section: User Commands (1)
Updated: 25-Jun-90
Index
Return to Main Contents
NAME
clr2gray - Convert color images to grayscale
SYNOPSIS
clr2gray [ -r<red> -g<grn> -b<blu> ] [ -<type> ] < color > gray
DESCRIPTION
Converts a color image (8bit or 24bit) to an 8 bit grayscale image.
It works for both mapped and unmapped color inputs.
OPTIONS
- -r<num>,-g<num>,-b<num>
-
weights,
used to convert the triple <red,green,blue> to a scalar intensity
value. If one or more weights are specified, those not specified
default to zero. If no weights are specified, NTSC weights (29.9%
red, 58.7% green, 11.4% blue) are used.
- -B
-
face
format, as used by Bennet Yee's
face
program at CMU.
- -F
-
FBM,
format (by default, the default). You are guaranteed not
to lose information by specifying FBM as the default.
- -G
-
GIF,
Compuserve GIF format.
- -I
-
IFF
format, interleaved bitmaps (ILBM), used by Amigas.
- -P
-
PBM,
Jef Poskanzer's bitmap format.
- -S
-
sun,
Sun rasterfiles (not run length encoded).
EXAMPLE
To convert a mapped color image in FBM format to a Sun
format grayscale image:
% clr2gray -S < foo.fbm > foo.8bit
To extract the red color plane from an image and write the result in
FBM format:
% clr2gray -r1 -F < foo.fbm > red.fbm
Note that since the green and blue weights were not specified, they
defaulted to 0, and the result is that only the red plane is used.
SEE ALSO
fbm(1) for general discussion, pbm(1) for PBM routines.
BUGS
None known.
HISTORY
Copyright (C) 1989,1990 by Michael Mauldin. Permission is granted
to use this file in whole or in part for any purpose, educational,
recreational or commercial, provided that this copyright notice
is retained unchanged. This software is available to all free of
charge by anonymous FTP and in the UUNET archives.
- 25-Jun-90 Michael Mauldin at Carnegie Mellon University
-
Release 1.0 mlm@cs.cmu.edu
- 07-Mar-89 Michael L. Mauldin at Carnegie Mellon University
-
Beta release (version 0.9) mlm@cs.cmu.edu
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- EXAMPLE
-
- SEE ALSO
-
- BUGS
-
- HISTORY
-
This document was created by
man2html,
using the manual pages.
Time: 01:28:13 GMT, December 05, 2024